import React from 'react'
import ReactDOM from 'react-dom'

const fn = () => {
  return <h1>hi fn!</h1>
}

const load = (loading) => {
  if (loading) {
    return <h2>loaded</h2>
  } else {
    return <h2>loading</h2>
  }
}
const box = (
  <ul>
    <li>{fn()}</li>
    <li>{load(true)}</li>
    <li>{true ? <span>加载完成11</span> : <span>加载中..</span>}</li>
    <li>{false && <h3>加载完成</h3>}</li>
    <li>5</li>
    <li>6</li>
    <li>7</li>
    <li>8</li>
    <li>9</li>
    <li>10</li>
  </ul>
)


ReactDOM.render(
  box,
  document.getElementById('root')
)


